Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building pblat for more platforms #51890

Merged
merged 4 commits into from
Nov 21, 2024
Merged

Building pblat for more platforms #51890

merged 4 commits into from
Nov 21, 2024

Conversation

druvus
Copy link
Member

@druvus druvus commented Nov 3, 2024

Describe your pull request here


Please read the guidelines for Bioconda recipes before opening a pull request (PR).

General instructions

  • If this PR adds or updates a recipe, use "Add" or "Update" appropriately as the first word in its title.
  • New recipes not directly relevant to the biological sciences need to be submitted to the conda-forge channel instead of Bioconda.
  • PRs require reviews prior to being merged. Once your PR is passing tests and ready to be merged, please issue the @BiocondaBot please add label command.
  • Please post questions on Gitter or ping @bioconda/core in a comment.

Instructions for avoiding API, ABI, and CLI breakage issues

Conda is able to record and lock (a.k.a. pin) dependency versions used at build time of other recipes.
This way, one can avoid that expectations of a downstream recipe with regards to API, ABI, or CLI are violated by later changes in the recipe.
If not already present in the meta.yaml, make sure to specify run_exports (see here for the rationale and comprehensive explanation).
Add a run_exports section like this:

build:
  run_exports:
    - ...

with ... being one of:

Case run_exports statement
semantic versioning {{ pin_subpackage("myrecipe", max_pin="x") }}
semantic versioning (0.x.x) {{ pin_subpackage("myrecipe", max_pin="x.x") }}
known breakage in minor versions {{ pin_subpackage("myrecipe", max_pin="x.x") }} (in such a case, please add a note that shortly mentions your evidence for that)
known breakage in patch versions {{ pin_subpackage("myrecipe", max_pin="x.x.x") }} (in such a case, please add a note that shortly mentions your evidence for that)
calendar versioning {{ pin_subpackage("myrecipe", max_pin=None) }}

while replacing "myrecipe" with either name if a name|lower variable is defined in your recipe or with the lowercase name of the package in quotes.

Bot commands for PR management

Please use the following BiocondaBot commands:

Everyone has access to the following BiocondaBot commands, which can be given in a comment:

@BiocondaBot please update Merge the master branch into a PR.
@BiocondaBot please add label Add the please review & merge label.
@BiocondaBot please fetch artifacts Post links to CI-built packages/containers.
You can use this to test packages locally.

Note that the @BiocondaBot please merge command is now depreciated. Please just squash and merge instead.

Also, the bot watches for comments from non-members that include @bioconda/<team> and will automatically re-post them to notify the addressed <team>.

Copy link
Contributor

coderabbitai bot commented Nov 3, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

The pull request introduces modifications to the meta.yaml file for the pblat package. The primary change is the update of the build number from 2 to 3, indicating a new build iteration. Additionally, a new entry for run_exports has been added, specifying a dependency on the pblat subpackage with a maximum pinning of x.x. The extra section has also been expanded with new entries under additional-platforms, which now includes support for linux-aarch64 and osx-arm64, thereby enhancing the package's compatibility with these architectures. Other metadata elements, such as the home URL, license information, summary, development URL, and notes, have not been modified. Overall, the changes focus on the increment of the build number, the introduction of a run export dependency, and the inclusion of support for additional platforms without altering core functionality or existing dependencies.

Possibly related PRs

Suggested labels

please review & merge

Suggested reviewers

  • mencian

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 50ccb3e and e9dca5d.

📒 Files selected for processing (2)
  • recipes/pblat/meta.yaml (2 hunks)
  • recipes/pblat/pblat-aarch64.patch (1 hunks)
🔇 Additional comments (5)
recipes/pblat/pblat-aarch64.patch (1)

9-10: Correct fix for va_list handling

The removal of args != NULL check is appropriate because:

  1. va_list is automatically initialized when entering a variadic function
  2. Checking va_list for NULL is redundant and potentially incorrect
  3. Only the format string needs NULL validation before using with vfprintf

The change makes the error handling more robust while maintaining security by keeping the essential format != NULL check.

Let's verify this fix works on the target platforms:

✅ Verification successful

Let me gather more information about the patch and its context.


Correct fix for va_list handling in htmlVaBadRequestAbort

The patch correctly removes the redundant args != NULL check. In C's variadic functions, va_list is automatically initialized and valid within the function scope, making the NULL check unnecessary and potentially problematic on aarch64. The patch maintains the essential format != NULL validation before using vfprintf, preserving the security aspect.

The patch is:

  • Properly integrated in meta.yaml specifically for aarch64 builds
  • The only patch file in the pblat recipe directory
  • Focused on fixing a platform-specific va_list handling issue
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if this patch is being applied correctly in the build process
# and if there are any related platform-specific issues reported

# Check if the patch is referenced in meta.yaml
rg "pblat-aarch64.patch" -A 5

# Look for any related platform-specific issues
gh issue list --repo bioconda/bioconda-recipes --search "pblat aarch64" --state all

Length of output: 381


Script:

#!/bin/bash
# Check the full patch content to understand the context
cat recipes/pblat/pblat-aarch64.patch

# Check if there are any other patches for pblat
fd ".*\.patch$" recipes/pblat/

# Look for any build logs or test failures
rg "pblat.*aarch64" -A 5

Length of output: 810

recipes/pblat/meta.yaml (4)

14-16: LGTM! Build configuration follows best practices

  • Build number increment is appropriate for the recipe changes
  • The run_exports configuration with x.x pinning follows the Bioconda guidelines for preventing ABI breakage

Line range hint 1-47: Overall recipe structure is well-maintained

The recipe maintains all required sections and properly preserves metadata while adding multi-platform support. The changes are focused and align well with the PR objectives for expanding platform support.


10-11: Verify the aarch64 patch file contents

The patch is conditionally applied for aarch64 architecture, but we should verify its contents and implementation.

✅ Verification successful

Patch file verified and appears correct for aarch64 support

The patch modifies the htmlVaBadRequestAbort function in lib/htmshell.c to fix a potential null pointer issue by removing the redundant args != NULL check. This is a valid fix since:

  • va_list args is already passed as a parameter
  • The check for args != NULL is unnecessary as va_list is a value type
  • The modification is safe and won't affect the function's behavior
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if the patch file exists and examine its contents
# Expected: Find and display the patch file contents

# Look for the patch file
fd "pblat-aarch64.patch" recipes/pblat

# If found, display its contents
if [ $? -eq 0 ]; then
  echo "=== Patch contents ==="
  cat recipes/pblat/pblat-aarch64.patch
fi

Length of output: 596


41-43: Verify build infrastructure support for new platforms

The addition of linux-aarch64 and osx-arm64 platforms is aligned with the PR objectives. However, we should verify:

  1. Build infrastructure support for these platforms
  2. Any platform-specific dependencies that might be needed
✅ Verification successful

Based on the search results, I can now generate the final response as we have sufficient evidence about platform support in the bioconda ecosystem.

Platform support for linux-aarch64 and osx-arm64 is well-established

The search results show multiple bioconda packages successfully supporting these platforms through:

  • Platform-specific patches (e.g., pblat-aarch64.patch for the same package)
  • Conditional URL downloads for different architectures
  • Platform-specific build configurations

This demonstrates established patterns and infrastructure support for both linux-aarch64 and osx-arm64 platforms in the bioconda ecosystem, including the presence of a platform-specific patch for pblat itself.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for platform-specific configurations and dependencies
# Expected: Find any platform-specific build or dependency configurations

# Look for platform-specific configurations in other bioconda recipes
echo "=== Checking for platform-specific patterns in other recipes ==="
rg -A 5 "(\[aarch64\]|\[arm64\])" recipes/

# Check for any build configuration files
echo "=== Checking for build configuration files ==="
fd "conda_build_config|config.yaml" .

Length of output: 12203


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
recipes/pblat/meta.yaml (1)

Line range hint 14-24: Consider adding run_exports for dependency version locking.

To prevent potential ABI breakage, consider adding a run_exports section for the C library dependencies. This ensures downstream recipes are built against compatible versions.

Example addition:

requirements:
  build:
    - make
    - {{ compiler('c') }}
  host:
    - zlib
    - openssl
  run:
    - zlib
    - openssl
  run_exports:
    - {{ pin_subpackage('pblat', max_pin='x.x.x') }}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 92c334d and b2b9a0e.

📒 Files selected for processing (1)
  • recipes/pblat/meta.yaml (2 hunks)
🔇 Additional comments (2)
recipes/pblat/meta.yaml (2)

12-12: LGTM: Build number increment is appropriate.

The build number increment is correct for adding platform support without changing the package version.


37-39: Verify build compatibility for new architectures.

While adding support for linux-aarch64 and osx-arm64 is valuable, please ensure:

  1. The C code compiles correctly on these architectures
  2. All dependencies are available for these platforms
  3. Consider adding platform-specific build flags if needed

Let's verify the availability of dependencies on these platforms:

@druvus druvus added aarch64 Related to adding linux-aarch64 support osx-arm64 Related to adding osx-arm64 support labels Nov 3, 2024
Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
@martin-g
Copy link
Contributor

@BiocondaBot please fetch artifacts

@BiocondaBot
Copy link
Collaborator

Package(s) built are ready for inspection:

Arch Package Zip File / Repodata CI Instructions
linux-64 pblat-2.5.1-h84c94e8_3.tar.bz2 linux-64.zip GitHub Actions
showYou may also use conda to install after downloading and extracting the zip file. conda install -c ./packages <package name>
osx-64 pblat-2.5.1-h48bcf1d_3.tar.bz2 osx-64.zip GitHub Actions
showYou may also use conda to install after downloading and extracting the zip file. conda install -c ./packages <package name>
osx-arm64 pblat-2.5.1-h2a2d339_3.tar.bz2 repodata.json CircleCI
showYou may also use conda to install:conda install -c https://output.circle-artifacts.com/output/job/3c8559b1-2c6a-4b7e-adf8-63d290f165c8/artifacts/0/tmp/artifacts/packages <package name>
linux-aarch64 pblat-2.5.1-h2ca6456_3.tar.bz2 repodata.json CircleCI
showYou may also use conda to install:conda install -c https://output.circle-artifacts.com/output/job/f8960cc6-25cf-47ef-b7d8-7c435a39b06e/artifacts/0/tmp/artifacts/packages <package name>

@martin-g
Copy link
Contributor

mgrigorov in 🌐 euler-arm-22 in /tmp/pblatttt via 🅒 test123 took 3s 
❯ tar xvf pblat-2.5.1-h2ca6456_3.tar.bz2                                                                                                                                                                   (test123) 
info/files
info/test/run_test.sh
info/run_exports.json
info/recipe/build.sh
info/hash_input.json
info/paths.json
info/licenses/LICENSE
info/index.json
info/recipe/pblat-aarch64.patch
info/recipe/meta.yaml.template
info/recipe/meta.yaml
info/recipe/conda_build_config.yaml
info/about.json
info/git
bin/pblat

mgrigorov in 🌐 euler-arm-22 in /tmp/pblatttt via 🅒 test123 
❯ file bin/*                                                                                                                                                                                               (test123) 
bin/pblat: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, with debug_info, not stripped

mgrigorov in 🌐 euler-arm-22 in /tmp/pblatttt via 🅒 test123 
❯ ./bin/pblat                                                                                                                                                                                              (test123) 
pblat - BLAT with parallel supports v. 36x2 fast sequence search command line tool

usage:
   pblat database query [-ooc=11.ooc] output.psl
where:
   database and query are each a .fa file.
   -ooc=11.ooc tells the program to load over-occurring 11-mers from
               an external file.  This will increase the speed
               by a factor of 40 in many cases, but is not required.
   output.psl is the name of the output file.

options:
   -t=type     Database type.  Type is one of:
                 dna - DNA sequence
                 prot - protein sequence
                 dnax - DNA sequence translated in six frames to protein
               The default is dna.
   -q=type     Query type.  Type is one of:
                 dna - DNA sequence
                 rna - RNA sequence
                 prot - protein sequence
                 dnax - DNA sequence translated in six frames to protein
                 rnax - DNA sequence translated in three frames to protein
               The default is dna.
   -prot       Synonymous with -t=prot -q=prot.
   -ooc=N.ooc  Use overused tile file N.ooc.  N should correspond to 
               the tileSize.
   -threads=N  Number of threads to run.
   -tileSize=N Sets the size of match that triggers an alignment.  
               Usually between 8 and 12.
               Default is 11 for DNA and 5 for protein.
   -stepSize=N Spacing between tiles. Default is tileSize.
   -oneOff=N   If set to 1, this allows one mismatch in tile and still
               triggers an alignments.  Default is 0.
   -minMatch=N Sets the number of tile matches.  Usually set from 2 to 4.
               Default is 2 for nucleotide, 1 for protein.
   -minScore=N Sets minimum score.  This is the matches minus the 
               mismatches minus some sort of gap penalty.  Default is 30.
   -minIdentity=N Sets minimum sequence identity (in percent).  Default is
               90 for nucleotide searches, 25 for protein or translated
               protein searches.
   -maxGap=N   Sets the size of maximum gap between tiles in a clump.  Usually
               set from 0 to 3.  Default is 2. Only relevent for minMatch > 1.
   -noHead     Suppress .psl header (so it's just a tab-separated file).
   -makeOoc=N.ooc Make overused tile file. Target needs to be complete genome.
   -repMatch=N Sets the number of repetitions of a tile allowed before
               it is marked as overused.  Typically this is 256 for tileSize
               12, 1024 for tile size 11, 4096 for tile size 10.
               Default is 1024.  Typically only comes into play with makeOoc.
               Also affected by stepSize. When stepSize is halved repMatch is
               doubled to compensate.
   -mask=type  Mask out repeats.  Alignments won't be started in masked region
               but may extend through it in nucleotide searches.  Masked areas
               are ignored entirely in protein or translated searches. Types are
                 lower - mask out lower cased sequence
                 upper - mask out upper cased sequence
                 out   - mask according to database.out RepeatMasker .out file
                 file.out - mask database according to RepeatMasker file.out
   -qMask=type Mask out repeats in query sequence.  Similar to -mask above but
               for query rather than target sequence.
   -repeats=type Type is same as mask types above.  Repeat bases will not be
               masked in any way, but matches in repeat areas will be reported
               separately from matches in other areas in the psl output.
   -minRepDivergence=NN   Minimum percent divergence of repeats to allow 
               them to be unmasked.  Default is 15.  Only relevant for 
               masking using RepeatMasker .out files.
   -dots=N     Output dot every N sequences to show program's progress.
   -trimT      Trim leading poly-T.
   -noTrimA    Don't trim trailing poly-A.
   -trimHardA  Remove poly-A tail from qSize as well as alignments in 
               psl output.
   -fastMap    Run for fast DNA/DNA remapping - not allowing introns, 
               requiring high %ID. Query sizes must not exceed 5000.
   -out=type   Controls output file format.  Type is one of:
                   psl - Default.  Tab separated format, no sequence
                   pslx - Tab separated format with sequence
                   axt - blastz-associated axt format
                   maf - multiz-associated maf format
                   sim4 - similar to sim4 format
                   wublast - similar to wublast format
                   blast - similar to NCBI blast format
                   blast8- NCBI blast tabular format
                   blast9 - NCBI blast tabular format with comments
   -fine       For high quality mRNAs look harder for small initial and
               terminal exons.  Not recommended for ESTs.
   -maxIntron=N  Sets maximum intron size. Default is 750000.
   -extendThroughN   Allows extension of alignment through large blocks of Ns.

LGTM!

@martin-g
Copy link
Contributor

@BiocondaBot please add label

@BiocondaBot BiocondaBot added the please review & merge set to ask for merge label Nov 19, 2024
@bgruening bgruening merged commit f5d4c05 into bioconda:master Nov 21, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aarch64 Related to adding linux-aarch64 support osx-arm64 Related to adding osx-arm64 support please review & merge set to ask for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants